#include <ros/ros.h>
#include <learning_topic/msg_demo.h>
#include <std_msgs/String.h>

int main(int argc,char **argv)
{    
	ros::init(argc,argv,"talker");
	ros::NodeHandle n;
	learning_topic::msg_demo msg;
	
	msg.name = "e";
	msg.value = 2.718;
	ros::Publisher pub = n.advertise<learning_topic::msg_demo>("e_value",1000);
	ros::Rate loop_rate(10);
	
	int count = 0;
	while(ros::ok())
	{
		ROS_INFO("Talker: You should realize that %s = %f", msg.name.c_str(), msg.value);
		pub.publish(msg);
		loop_rate.sleep();
		++count;
	}
	return 0;
}

